[Backport] Windows: Restrict path for dynamic library loading#2
Open
jibeee wants to merge 1 commit intonode-usb:hpfrom
Open
[Backport] Windows: Restrict path for dynamic library loading#2jibeee wants to merge 1 commit intonode-usb:hpfrom
jibeee wants to merge 1 commit intonode-usb:hpfrom
Conversation
Collaborator
|
This outdated fork of libusb has many problems, and backporting changes one-by-one seems futile. cc @thegecko -- I can move this fork to the node-usb org if you want it. |
Member
I think that makes sense. Happy to then update the submodule |
Collaborator
|
Transferred the repo |
Author
|
Do you need more information for the review? |
Member
@kevinmehall is better placed to review this PR. We need to decide whether to either apply patches like this or re-implement hotplug support on top of the latest libusb. Alternatively, if everyone could focus on fixing libusb#86, we could just use upstream libusb :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR prevents DLL planting on Windows.
libusb loads USB backends from various path using
LoadLibrary. Thisfunction performs a search through various path when provided a library
name that does not include a path element. An attacker could plant a DLL
in one of the searched path, and it would be loaded by libusb.
To prevent this, libraries are now only loaded from the Windows system
directory.
Based on libusb@c3deb6d